<?php

namespace Ue\ErpBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * PurchaseOrderItem
 *
 * @ORM\Table(name="ue_purchase_order_item", indexes={@ORM\Index(name="ue_purchase_order_item_product_id_idx", columns={"product_id"})})
 * @ORM\Entity
 */
class PurchaseOrderItem
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var integer
     *
     * @ORM\Column(name="order_id", type="integer", nullable=true)
     */
    private $orderId;

    /**
     * @var integer
     *
     * @ORM\Column(name="qty", type="integer", nullable=true)
     */
    private $qty = '1';

    /**
     * @var float
     *
     * @ORM\Column(name="total_price", type="float", precision=12, scale=2, nullable=true)
     */
    private $totalPrice;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="created_at", type="datetime", nullable=false)
     */
    private $createdAt;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="updated_at", type="datetime", nullable=false)
     */
    private $updatedAt;

    /**
     * @var integer
     *
     * @ORM\Column(name="stock_in_qty", type="integer", nullable=true)
     */
    private $stockInQty = '0';

    /**
     * @var float
     *
     * @ORM\Column(name="price", type="float", precision=12, scale=2, nullable=true)
     */
    private $price;

    /**
     * @var float
     *
     * @ORM\Column(name="unit_cost", type="float", precision=12, scale=2, nullable=true)
     */
    private $unitCost = '0.00';

    /**
     * @var float
     *
     * @ORM\Column(name="total_cost", type="float", precision=12, scale=2, nullable=true)
     */
    private $totalCost = '0.00';

    /**
     * @var float
     *
     * @ORM\Column(name="unit_cost_exclude_tax", type="float", precision=12, scale=2, nullable=true)
     */
    private $unitCostExcludeTax = '0.00';

    /**
     * @var float
     *
     * @ORM\Column(name="total_cost_exclude_tax", type="float", precision=12, scale=2, nullable=true)
     */
    private $totalCostExcludeTax = '0.00';

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="production_date", type="date", nullable=true)
     */
    private $productionDate;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="valid_date", type="date", nullable=true)
     */
    private $validDate;

    /**
     * @var float
     *
     * @ORM\Column(name="in_tax", type="float", precision=12, scale=2, nullable=true)
     */
    private $inTax = '0.00';

    /**
     * @var float
     *
     * @ORM\Column(name="in_tax_rate", type="float", precision=12, scale=2, nullable=true)
     */
    private $inTaxRate = '0.00';

    /**
     * @var \Product
     *
     * @ORM\ManyToOne(targetEntity="Product")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="product_id", referencedColumnName="id")
     * })
     */
    private $product;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set orderId
     *
     * @param integer $orderId
     * @return PurchaseOrderItem
     */
    public function setOrderId($orderId)
    {
        $this->orderId = $orderId;

        return $this;
    }

    /**
     * Get orderId
     *
     * @return integer 
     */
    public function getOrderId()
    {
        return $this->orderId;
    }

    /**
     * Set qty
     *
     * @param integer $qty
     * @return PurchaseOrderItem
     */
    public function setQty($qty)
    {
        $this->qty = $qty;

        return $this;
    }

    /**
     * Get qty
     *
     * @return integer 
     */
    public function getQty()
    {
        return $this->qty;
    }

    /**
     * Set totalPrice
     *
     * @param float $totalPrice
     * @return PurchaseOrderItem
     */
    public function setTotalPrice($totalPrice)
    {
        $this->totalPrice = $totalPrice;

        return $this;
    }

    /**
     * Get totalPrice
     *
     * @return float 
     */
    public function getTotalPrice()
    {
        return $this->totalPrice;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return PurchaseOrderItem
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set updatedAt
     *
     * @param \DateTime $updatedAt
     * @return PurchaseOrderItem
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;

        return $this;
    }

    /**
     * Get updatedAt
     *
     * @return \DateTime 
     */
    public function getUpdatedAt()
    {
        return $this->updatedAt;
    }

    /**
     * Set stockInQty
     *
     * @param integer $stockInQty
     * @return PurchaseOrderItem
     */
    public function setStockInQty($stockInQty)
    {
        $this->stockInQty = $stockInQty;

        return $this;
    }

    /**
     * Get stockInQty
     *
     * @return integer 
     */
    public function getStockInQty()
    {
        return $this->stockInQty;
    }

    /**
     * Set price
     *
     * @param float $price
     * @return PurchaseOrderItem
     */
    public function setPrice($price)
    {
        $this->price = $price;

        return $this;
    }

    /**
     * Get price
     *
     * @return float 
     */
    public function getPrice()
    {
        return $this->price;
    }

    /**
     * Set unitCost
     *
     * @param float $unitCost
     * @return PurchaseOrderItem
     */
    public function setUnitCost($unitCost)
    {
        $this->unitCost = $unitCost;

        return $this;
    }

    /**
     * Get unitCost
     *
     * @return float 
     */
    public function getUnitCost()
    {
        return $this->unitCost;
    }

    /**
     * Set totalCost
     *
     * @param float $totalCost
     * @return PurchaseOrderItem
     */
    public function setTotalCost($totalCost)
    {
        $this->totalCost = $totalCost;

        return $this;
    }

    /**
     * Get totalCost
     *
     * @return float 
     */
    public function getTotalCost()
    {
        return $this->totalCost;
    }

    /**
     * Set unitCostExcludeTax
     *
     * @param float $unitCostExcludeTax
     * @return PurchaseOrderItem
     */
    public function setUnitCostExcludeTax($unitCostExcludeTax)
    {
        $this->unitCostExcludeTax = $unitCostExcludeTax;

        return $this;
    }

    /**
     * Get unitCostExcludeTax
     *
     * @return float 
     */
    public function getUnitCostExcludeTax()
    {
        return $this->unitCostExcludeTax;
    }

    /**
     * Set totalCostExcludeTax
     *
     * @param float $totalCostExcludeTax
     * @return PurchaseOrderItem
     */
    public function setTotalCostExcludeTax($totalCostExcludeTax)
    {
        $this->totalCostExcludeTax = $totalCostExcludeTax;

        return $this;
    }

    /**
     * Get totalCostExcludeTax
     *
     * @return float 
     */
    public function getTotalCostExcludeTax()
    {
        return $this->totalCostExcludeTax;
    }

    /**
     * Set productionDate
     *
     * @param \DateTime $productionDate
     * @return PurchaseOrderItem
     */
    public function setProductionDate($productionDate)
    {
        $this->productionDate = $productionDate;

        return $this;
    }

    /**
     * Get productionDate
     *
     * @return \DateTime 
     */
    public function getProductionDate()
    {
        return $this->productionDate;
    }

    /**
     * Set validDate
     *
     * @param \DateTime $validDate
     * @return PurchaseOrderItem
     */
    public function setValidDate($validDate)
    {
        $this->validDate = $validDate;

        return $this;
    }

    /**
     * Get validDate
     *
     * @return \DateTime 
     */
    public function getValidDate()
    {
        return $this->validDate;
    }

    /**
     * Set inTax
     *
     * @param float $inTax
     * @return PurchaseOrderItem
     */
    public function setInTax($inTax)
    {
        $this->inTax = $inTax;

        return $this;
    }

    /**
     * Get inTax
     *
     * @return float 
     */
    public function getInTax()
    {
        return $this->inTax;
    }

    /**
     * Set inTaxRate
     *
     * @param float $inTaxRate
     * @return PurchaseOrderItem
     */
    public function setInTaxRate($inTaxRate)
    {
        $this->inTaxRate = $inTaxRate;

        return $this;
    }

    /**
     * Get inTaxRate
     *
     * @return float 
     */
    public function getInTaxRate()
    {
        return $this->inTaxRate;
    }

    /**
     * Set product
     *
     * @param \Ue\ErpBundle\Entity\Product $product
     * @return PurchaseOrderItem
     */
    public function setProduct(\Ue\ErpBundle\Entity\Product $product = null)
    {
        $this->product = $product;

        return $this;
    }

    /**
     * Get product
     *
     * @return \Ue\ErpBundle\Entity\Product 
     */
    public function getProduct()
    {
        return $this->product;
    }
}
